﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

// NotReviewedButNeeded

#pragma once

#include "GcmpLocatorCommands.h"
#include "Vector3d.h"

namespace gcmp
{
    class IActionLocatorBehavior;

    /// \brief 配置罗盘沿轴线移动Action的生成器ActionLocatorLinearMoveCreator参数
    class GCMP_LOCATOR_COMMANDS_EXPORT ActionLocatorLinearMoveInput
    {
    public:
        /// \brief 构造函数
        /// \param opActionBehavior 罗盘沿轴线移动Action的Behavior，用于配置罗盘移动操作行为
        /// \param handleId 罗盘轴线Id
        /// \param startPoint 移动操作起点
        /// \param bMoveLocatorOnly     是否仅移动罗盘
        ActionLocatorLinearMoveInput(OwnerPtr<gcmp::IActionLocatorBehavior> opActionBehavior, ElementId  handleId, const Vector3d& startPoint , bool bMoveLocatorOnly = false);

        /// \brief 析构函数
        ~ActionLocatorLinearMoveInput() {}

    public:
        /// \brief 获取罗盘沿轴线移动Action的Behavior
        /// \return 罗盘沿轴线移动Action的Behavior指针
        OwnerPtr<IActionLocatorBehavior> GetLinearMoveBehavior();

        /// \brief 获取罗盘轴线Id
        /// \return 轴线Id
        ElementId GetMovementHandleId()
        {
            return m_handleId;
        }

        /// \brief 获取罗盘移动起点
        /// \return 罗盘移动起点
        const Vector3d& GetMovementStartPoint()
        {
            return m_startPoint;
        }

        /// \brief 是否仅移动罗盘
        /// \return Y:true, N:false
        bool IsOnlyMoveLocator()
        {
            return m_bMoveLocatorOnly;
        }
    private:
        OwnerPtr<gcmp::IActionLocatorBehavior> m_opActionBehavior;
        ElementId  m_handleId;
        Vector3d   m_startPoint;
        bool m_bMoveLocatorOnly;
    };
}
